﻿@model IEnumerable<TCC.CMFlow.Models.MenuSistema>

@{
    var perfilAcessoID = Convert.ToInt32(ViewData["PerfilAcessoID"]);
}

<div class="panel panel-primary">
    <div class="panel-heading clearfix">
        <h3 class="panel-title pull-left"><strong>Menus do Sistema</strong></h3>
    </div>
    <div class="panel-group" id="accordion">
        @foreach (var item in Model)
        {
            <div class="panel panel-default">
                <div class="panel-heading clearfix">
                    <h3 class="panel-title pull-left">
                        <a data-toggle="collapse" data-target="#collapse@(item.ID)" href="#collapse@(item.ID)" style="text-decoration:none">
                            <span class="glyphicon glyphicon-chevron-down">&nbsp;</span>
                            @Html.DisplayFor(modelItem => item.Nome)
                        </a>
                    </h3>
                </div>
                <div id="collapse@(item.ID)" class="panel-collapse collapse">
                    @Html.Partial("_PerfilAcessoModulos", item.ModulosSistema, new ViewDataDictionary { { "PerfilAcessoID", perfilAcessoID } })
                </div>
            </div>
        }
    </div>
</div>
